package com.zxx.coolweather;

import android.app.Application;
import android.content.Context;

import com.yanzhenjie.nohttp.Logger;
import com.yanzhenjie.nohttp.NoHttp;

import org.litepal.LitePalApplication;

/**
 * @author zxx on 2021/8/25
 */
public class MyApplication extends Application {

    private static Context context;

    @Override
    public void onCreate() {
        super.onCreate();
        context = this;

        LitePalApplication.initialize(this);

        NoHttp.initialize(this); // NoHttp默认初始化。
        Logger.setDebug(true); // 开启NoHttp调试模式。
        Logger.setTag("NoHttpSample"); // 设置NoHttp打印Log的TAG。
    }

    public static Context getContext(){
        return context;
    }

}
